<script>
	import config from './config'
	import store from '@/store'
	import {
		getToken
	} from '@/utils/auth'
	export default {
		globalData: {
			audio:{}
		},
		onLaunch: function() {
			this.initApp()
			this.globalData.audio = uni.createInnerAudioContext();
			this.globalData.audio.src ='http://xxxxxxxxxxxxx.mp3'; // 小程序播放的音频链接
			this.globalData.audio.autoplay = true;
			this.globalData.audio.loop = true;
			this.globalData.audio.sessionCategory = "ambient";
		},
		onHide() {
			this.globalData.audio.stop();
		},
		methods: {
			// 初始化应用
			initApp() {
				// 初始化应用配置
				this.initConfig()
			},
			initConfig() {
				this.globalData.config = config
			},
		}
	}
</script>

<style lang="scss">
	@import 'uni_modules/tuniao-ui/index.scss';
	@import 'uni_modules/tuniao-ui/iconfont.css';
	@import "uni_modules/colorui/icon.css";
	@import "uni_modules/colorui/main.css";
</style>
